package com.gem.day7.enumdemo;

public class YearClass {
	private String name;
	private int ordinal;
	
	public String getName() {
		return name;
	}
	public int getOrdinal() {
		return ordinal;
	}
	
	public YearClass(String name, int ordinal) {
		super();
		this.name = name;
		this.ordinal = ordinal;
	}

	//	SPRING,SUMMER,AUTUMN,WINTER;
//	YearEnum SPRING=new YearEnum();
//	YearEnum SUMMER=new YearEnum();
//	YearEnum AUTUMN=new YearEnum();
//	YearEnum WINTER=new YearEnum();
	public static final YearClass SPRING=new YearClass("SPING",0);
	public static final YearClass SUMMER=new YearClass("SUMMER",1);
	public static final YearClass AUTUMN=new YearClass("AUTUMN",2);
	public static final YearClass WINTER=new YearClass("WINTER",3);
	 public String toString() {
	        return this.getName()+"  "+this.getOrdinal();
	    }
}
